import cv2

img = cv2.imread('../asset/girl.jpeg')
new_img = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
# dst = cv2.adaptiveThreshold(new_img, 255,
#                                  cv2.ADAPTIVE_THRESH_GAUSSIAN_C,
#                                  cv2.THRESH_BINARY, 3, 0)
dst = cv2.adaptiveThreshold(new_img, 255,
                            cv2.ADAPTIVE_THRESH_GAUSSIAN_C,
                            cv2.THRESH_BINARY_INV, 11, 0)
print(dst.shape)
while True:
    cv2.imshow('new_img', new_img)
    cv2.imshow('dst', dst)
    key = cv2.waitKey(10)
    if key & 0xFF == ord('q'):
        break
cv2.destroyAllWindows()
